#include "rrmaterial.h"

RRMaterial::RRMaterial()
{
    reflection = 0.0;
    transparency = 0.0;
    reversal = 1;
    amb = RRSetVec4(0.2, 0.2, 0.2, 1.0);
    diff = RRSetVec4(0.8, 0.8, 0.8, 1.0);
    spec = 1.0;
}

double RRMaterial::rrGetRef()
{
    return reflection;
}

double RRMaterial::rrGetTransp()
{
    return transparency;
}

int RRMaterial::rrGetRev()
{
    return reversal;
}

RRVec4 RRMaterial::rrGetAmb()
{
    return amb;
}

RRVec4 RRMaterial::rrGetDiff()
{
    return diff;
}

double RRMaterial::rrGetSpec()
{
    return spec;
}

void RRMaterial::rrSetMaterial(RRMaterial *mat)
{
    reflection = mat->rrGetRef();
    transparency = mat->rrGetTransp();
    reversal = mat->rrGetRev();
    amb = mat->rrGetAmb();
    diff = mat->rrGetDiff();
    spec = mat->rrGetSpec();
}

void RRMaterial::rrSetMaterial(double refl, double transpa, int reve, RRVec4 ambi, RRVec4 diffu, double specu)
{
    reflection = refl;
    transparency = transpa;
    reversal = reve;
    amb = ambi;
    diff = diffu;
    spec = specu;
}

void RRMaterial::rrSetRef(double arg)
{
    reflection = arg;
}

void RRMaterial::rrSetTransp(double arg)
{
    transparency = arg;
}

void RRMaterial::rrSetRev(int arg)
{
    reversal = arg;
}

void RRMaterial::rrSetAmb(RRVec4 arg)
{
    amb = arg;
}

void RRMaterial::rrSetDiff(RRVec4 arg)
{
    diff = arg;
}

void RRMaterial::rrSetSpec(double arg)
{
    spec = arg;
}
